package com.haiyou.dc.es.entity.form;

import com.haiyou.common.param.PageParam;
import lombok.Data;
import lombok.ToString;

/**
 * @author pc
 */
@Data
@ToString(callSuper = true)
public class RentSearchForm extends PageParam {

    private String cityEnName;
    private String regionEnName;
    private String priceBlock;
    private String areaBlock;
    private int room;
    private int direction;
    private String keywords;
    private int rentWay = -1;
    private String orderBy = "lastUpdateTime";
    private String orderDirection = "desc";

    public int getRentWay() {
        if (rentWay > -2 && rentWay < 2) {
            return rentWay;
        } else {
            return -1;
        }
    }
}
